import store from './store';
import {addToCart,deleteFromCart,updateCart} from "./actions/cart-actions";

import React from 'react'
import ReactDom from 'react-dom'

import Root from './component/root'

import './css/index.css'




//console.log(store.getState());

let unsubscribe = store.subscribe(() => console.log(store.getState()));

// store.dispatch(addToCart('Coffee 500gm', 1, 250));
// store.dispatch(addToCart('Flour 1kg', 2, 110));
// store.dispatch(addToCart('Juice 2L', 1, 250));
// // Update Cart
// store.dispatch(updateCart('Flour 1kg', 5, 110));
//
// // Delete from Cart
// store.dispatch(deleteFromCart('Coffee 500gm'));

unsubscribe();





ReactDom.render(<Root />,document.getElementById('root'));

